using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using WindowsPhoneMVC.Phone;

namespace WindowsPhoneMVC.Navigation
{
    [DataContract]
    public class NavigationRequest
    {
        /// <summary>
        /// Required for serialisation, don't use
        /// </summary>
        public NavigationRequest()
        {
            Parameters = new List<NavigationParameter>();
        }

        public NavigationRequest(string navigationFrameName, string controllerName, string actionName, params NavigationParameter[] parameters)
        {
            ControllerName = controllerName;
            ActionName = actionName;
            NavigationFrameName = navigationFrameName;
            Parameters = new List<NavigationParameter>(parameters);
        }

        [DataMember]
        public string NavigationFrameName { get; set; }

        [DataMember]
        public string ControllerName { get; set; }

        [DataMember]
        public string ActionName { get; set; }

        [DataMember]
        public IEnumerable<NavigationParameter> Parameters { get; set; }

        [DataMember]
        public PageTransientStore PageState { get; set; }
    }
}